﻿@addTagHelper *, WebVella.Erp.Plugins.Core
@addTagHelper *, WebVella.Erp.Web
@addTagHelper *, WebVella.TagHelpers
@using WebVella.Erp.Web.Utils;
@using WebVella.Erp.Web.Components;
@using WebVella.Erp.Web;
@using WebVella.Erp.Api.Models;
@using WebVella.TagHelpers.Models;
@{
	var options = (PcForm.PcFormOptions)ViewBag.Options;
	var labelRenderModeOptions = (List<WvSelectOption>)ViewBag.LabelRenderModeOptions;
	var fieldRenderModeOptions = (List<WvSelectOption>)ViewBag.FieldRenderModeOptions;
	var methodOptions = (List<SelectOption>)ViewBag.MethodOptions;
	var erpRequest = (ErpRequestContext)ViewBag.RequestContext;
}

<wv-row>
	<wv-column span="4">
		<wv-field-datasource name="is_visible" label-text="Is Rendered" value="@options.IsVisible" page-id="erpRequest.Page.Id" placeholder="true"></wv-field-datasource>
	</wv-column>
</wv-row>
<wv-row>
	<wv-column span="4">
		<wv-field-text name="id" value="@options.Id" label-text="Id"></wv-field-text>
	</wv-column>
	<wv-column span="4">
		<wv-field-text name="name" value="@options.Name" label-text="Name"></wv-field-text>
	</wv-column>
	<wv-column span="4">
		<wv-field-text name="hook_key" value="@options.HookKey" label-text="Custom Hook key" description="if needed, provide an unique name, and use it in our plugin hooks"></wv-field-text>
	</wv-column>
</wv-row>
<wv-row>
	<wv-column span="4">
		<wv-field-select name="method" value="@options.Method" label-text="Method" options="@methodOptions.ToWvSelectOption()" required="true"></wv-field-select>
	</wv-column>
	<wv-column span="4">
		<wv-field-select name="label_mode" value="@options.LabelMode" label-text="Label mode" options="@labelRenderModeOptions" required="true"></wv-field-select>
	</wv-column>
	<wv-column span="4">
		<wv-field-select name="mode" value="@options.Mode" label-text="Mode" options="@fieldRenderModeOptions" required="true"></wv-field-select>
	</wv-column>
</wv-row>
<wv-row>
	<wv-column span="4">
		<wv-field-text name="class" label-text="Css class" value="@options.Class"></wv-field-text>
	</wv-column>
	<wv-column span="4">
		<wv-field-checkbox name="show_validation" label-text="Show Validation" value="@options.ShowValidation" text-true="show page validation object as message"></wv-field-checkbox>
	</wv-column>
</wv-row>







